package com.github.ecbp.user.service.dto;

import com.github.ecbp.common.security.vo.DefaultUserDetails;
import io.swagger.annotations.ApiModel;
import lombok.Data;

@ApiModel
@Data
public class MenuBo {

    /**
     * 是否查询携带按钮
     */
    private Boolean carryButton = false;
    /**
     * 查询类型 0:获取当前用户[userDetails]拥有权限的所有菜单; 1:获取当前角色[roleId]拥有权限的所有菜单; 2:获取所有菜单
     */
    private int accessType = 0;

    private DefaultUserDetails userDetails;

    private Long roleId;

    private String systemType;

    public MenuBo(Boolean carryButton, DefaultUserDetails userDetails) {
        this.carryButton = carryButton;
        this.accessType = 0;
        this.userDetails = userDetails;
    }

    public MenuBo(Boolean carryButton, Long roleId) {
        this.carryButton = carryButton;
        this.accessType = 1;
        this.roleId = roleId;
    }

    public MenuBo(Boolean carryButton) {
        this.carryButton = carryButton;
        this.accessType = 2;
    }
}
